//
//  SelectFactoryFoldCellModel.m
//  Rail
//
//  Created by huyuchen on 2018/3/19.
//  Copyright © 2018年 Hychen. All rights reserved.
//

#import "SelectFactoryFoldCellModel.h"

@implementation SelectFactoryFoldCellModel

- (NSArray *)open {
    NSArray *submodels = self.submodels;
    self.submodels = nil;
    self.belowCount = submodels.count;
    return submodels;
}

- (void)closeWithSubmodels:(NSArray *)submodels {
    self.submodels = [NSMutableArray arrayWithArray:submodels];
    self.belowCount = 0;
}

- (void)setBelowCount:(NSUInteger)belowCount {
    self.supermodel.belowCount += (belowCount - _belowCount);
    _belowCount = belowCount;
}
@end
